//
//  TraditionPOSListCell.m
//  NewPro
//
//  Created by 何荧红 on 2019/3/20.
//  Copyright © 2019 何荧红. All rights reserved.
//

#import "TraditionPOSListCell.h"

@interface TraditionPOSListCell ()

@property (nonatomic, strong) UILabel *titleLab;
@property (nonatomic, strong) UILabel *NumLab;

@end


@implementation TraditionPOSListCell

-(void)setNumStr:(NSString *)NumStr{
    _NumStr = NumStr;
    if (_NumStr.length > 0) {
        self.NumLab.text = _NumStr;
    }
}
- (void)setTitleStr:(NSString *)titleStr{
    _titleStr = titleStr;
    if (_titleStr.length > 0) {
        self.titleLab.text = _titleStr;
    }
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.frame = CGRectMake(0, 0, SCREEN_WIDTH, 44);
        self.backgroundColor = [UIColor whiteColor];
        [self CreateWithView];
    }
    return self;
}
- (void)CreateWithView{
    self.titleLab = [[UILabel alloc]init];
    _titleLab.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:14];
    _titleLab.textColor = [UIColor colorWithHexString:@"333333"];
    [self addSubview:self.titleLab];
    [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.mas_centerY);
        make.left.equalTo(self.mas_left).offset(14);
    }];
    UIImageView *img = [[UIImageView alloc]init];
    img.image = [UIImage imageNamed:@"灰色右箭头"];
    [self addSubview:img];
    [img mas_makeConstraints:^(MASConstraintMaker *make) {
        make.height.mas_equalTo(13);
        make.width.mas_equalTo(7);
        make.centerY.equalTo(self.mas_centerY);
        make.right.equalTo(self.mas_right).offset(-14);
    }];
    self.NumLab = [[UILabel alloc]init];
    _NumLab.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:12];
    _NumLab.textColor = [UIColor colorWithHexString:@"333333"];
    [self addSubview:self.NumLab];
    [self.NumLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.mas_centerY);
        make.right.equalTo(img.mas_left).offset(-16);
    }];
}
- (void)awakeFromNib {
    [super awakeFromNib];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

@end
